package javabase.rmi;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

public class Server {

    public static void main(String[] args) throws RemoteException {
        Business business = new BusinessImpl();
        UnicastRemoteObject.exportObject(business, 1001);
        Registry registry = LocateRegistry.createRegistry(1002);
        registry.rebind("rmi test", business);
    }

}
